

# pip install langchain_openai==0.1.23
import os
os.environ["OPENAI_API_KEY"]  ='YOUR_API_KEY'
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model='ep-20241104131149-csxf9',
                 base_url = "https://ark.cn-beijing.volces.com/api/v3",
                 )
text = llm.predict("请给我写一句情人节红玫瑰的中文宣传语")
print(text)

